-
-
Notifications
You must be signed in to change notification settings - Fork 16.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add datetime.date support to JSONEncoder #1326
Conversation
|
@davidism - thanks! I've reduced it to a single check. |
You should add a test for this as well. In addition, the commits can be squashed into one. |
And please add a changelog too :) You can squash commits with:
But it doesn't really matter if you don't. @davidism Thanks for reviewing this! |
Will do, thanks! |
Added tests for both datetime.datetime and datetime.date types. |
Could you add a changelog item for 1.0 too? |
why does the "unit-test" involve a flask app and a test client, its just jsonify this time |
@untitaker - changelog entry added. sorry - I misunderstood what you were asking for before. @RonnyPfannschmidt - mainly it's that way because that's how all of other tests are to be set up, but also because jsonify doesn't seem to work outside of an application context. I supposed because it returns an actual response in addition to the serialized data. |
Woo, thanks! Your explanation for using a temporary app for testing is sound, although I haven't explored this myself. |
Add support for the datetime.date type to jsonify, which currently only supports the datetime.datetime type.
Changelog